<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
  </head>
  <body>
    <script>
      //doc.houdunren.com
      let a = [1, 2, 3, 4, 5]
      let b = a.slice().splice(0, 1, 'yahoo')
      console.log(b)

      //   let b = a.slice(0, 2)
      //   a[1] = 'yahoo'
      //   console.log(a)

      //   console.log(b)
    </script>
  </body>
</html>
